Skip to content

OCPBUGS-62869: disable metrics auth for hypershift clusters - #1242

Merged
openshift-merge-bot[bot] merged 3 commits into
openshift:release-4.18from
deads2k:metrics-4.18
Oct 13, 2025
Merged

OCPBUGS-62869: disable metrics auth for hypershift clusters#1242
openshift-merge-bot[bot] merged 3 commits into
openshift:release-4.18from
deads2k:metrics-4.18

Conversation

@deads2k

@deads2k deads2k commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

CVO does not honor client certificates per the OCP metrics standard and HCP does not configure the secret. The combination of these two things means that on HCP, if we enable the CVO's auth handler, we lose the ability to determine if clusteroperators are functioning correctly at scale.

/assign @wking

…obot/cherry-pick-1222-to-release-4.18"

This reverts commit 78df707, reversing
changes made to 94c0e70.
…robot/cherry-pick-1222-to-release-4.18"

This reverts commit 92dd0b2.
CVO does not honor client certificates per the OCP metrics standard and
HCP does not configure the secret.  The combination of these two things
means that on HCP, if we enable the CVO's auth handler, we lose the
ability to determine if clusteroperators are functioning correctly at
scale.
Comment thread pkg/cvo/metrics.go
Comment on lines +136 to +143
if disableAuth {
handler := http.NewServeMux()
handler.Handle("/metrics", promhttp.Handler())
server := &http.Server{
Handler: handler,
}
return server
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the code prior to #1223

Comment thread pkg/start/start.go
go func() {
defer utilruntime.HandleCrash()
err := cvo.RunMetrics(postMainContext, shutdownContext, o.ListenAddr, o.ServingCertFile, o.ServingKeyFile, restConfig)
disableMetricsAuth := o.InjectClusterIdIntoPromQL // this is wired to the "--hypershift" flag, so when hypershfit is no, we disableMetricsAuth

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have direct access to o.HyperShift here, so you can just use that instead of creating a local disableMetricsAuth variable, without having to touch o.InjectClusterIdIntoPromQL

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wking wking left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 8, 2025
@openshift-ci

openshift-ci Bot commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 8, 2025
@deads2k

deads2k commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

/hold

hold so we can get all the releases ready and finalize tomorrow.

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 8, 2025
@openshift-ci

openshift-ci Bot commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

@deads2k: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@wking

wking commented Oct 9, 2025

Copy link
Copy Markdown
Member

/jira cherrypick OCPBUGS-62868

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@wking: Jira Issue OCPBUGS-62868 has been cloned as Jira Issue OCPBUGS-62869. Will retitle bug to link to clone.
/retitle OCPBUGS-62869: disable metrics auth for hypershift clusters

Details

In response to this:

/jira cherrypick OCPBUGS-62868

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot changed the title disable metrics auth for hypershift clusters OCPBUGS-62869: disable metrics auth for hypershift clusters Oct 9, 2025
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Oct 9, 2025
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@deads2k: This pull request references Jira Issue OCPBUGS-62869, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected dependent Jira Issue OCPBUGS-62868 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is New instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

CVO does not honor client certificates per the OCP metrics standard and HCP does not configure the secret. The combination of these two things means that on HCP, if we enable the CVO's auth handler, we lose the ability to determine if clusteroperators are functioning correctly at scale.

/assign @wking

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@deads2k

deads2k commented Oct 9, 2025

Copy link
Copy Markdown
Contributor Author

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 9, 2025
@sjenning

sjenning commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

/verified by @sjenning

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Oct 9, 2025
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@sjenning: This PR has been marked as verified by @sjenning.

Details

In response to this:

/verified by @sjenning

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@wking

wking commented Oct 9, 2025

Copy link
Copy Markdown
Member

/label backport-risk-assessed

@openshift-ci openshift-ci Bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Oct 9, 2025
@deads2k

deads2k commented Oct 13, 2025

Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Oct 13, 2025
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@deads2k: This pull request references Jira Issue OCPBUGS-62869, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.z) matches configured target version for branch (4.18.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-62868 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-62868 targets the "4.19.z" version, which is one of the valid target versions: 4.19.0, 4.19.z
  • bug has dependents

Requesting review from QA contact:
/cc @jiajliu

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
openshift-ci Bot requested a review from jiajliu October 13, 2025 14:31
@openshift-merge-bot
openshift-merge-bot Bot merged commit 6944492 into openshift:release-4.18 Oct 13, 2025
14 checks passed
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@deads2k: Jira Issue Verification Checks: Jira Issue OCPBUGS-62869
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-62869 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

CVO does not honor client certificates per the OCP metrics standard and HCP does not configure the secret. The combination of these two things means that on HCP, if we enable the CVO's auth handler, we lose the ability to determine if clusteroperators are functioning correctly at scale.

/assign @wking

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants